package com.vhall.component.entity.account.enums;

import com.vhall.component.entity.dictionary.enums.BaseEnum;

/**
 * GuoXinStaffEnums-
 * 是否是国信员工
 * 0：非员工 1：员工
 * @author xing.wang
 * @date 2023/8/19
 */

public enum GuoXinStaffEnums implements BaseEnum {
    NO_STAFF(0,"非员工"),STAFF(1,"员工");
    private final Integer value;
    private final String name;

    GuoXinStaffEnums(Integer value, String name) {
        this.value = value;
        this.name = name;
    }

    @Override
    public Integer getValue() {
        return value;
    }

    @Override
    public String getName() {
        return name;
    }
    /**
     * 通过 value 获取 name
     * @param value
     * @return
     */
    public static String getNameByValue(Integer value) {
        for (GuoXinStaffEnums e : GuoXinStaffEnums.values()) {
            if (e.getValue().equals(value)) {
                return e.getName();
            }
        }
        return null;
    }
}
